import { getPointsAndServiceFeeEnable } from '@src/api/Member'
import { t } from '@src/locales'
export default {
    name: 'member-mixin',
    data() {
      return {
        enableAuth: {}
      };
    },
    computed: {
        balanceEnable() {
          return this.enableAuth.balanceEnable || false
        },
        pointsEnable() {
          return this.enableAuth.pointsEnable || false
        },
        quotaEnable() {
          return this.enableAuth.quotaEnable || false
        },
        serviceFeeEnable() {
          return this.enableAuth.serviceFeeEnable || false
        },
    },
    mounted() {
        this.getEnableAuth()
    },
    methods: {
        async getEnableAuth() {
            const { status, data } = await getPointsAndServiceFeeEnable({})
            if (status !== 0) return this.$message.error(t('member.detail.title26'));
            this.enableAuth = data
        },
    },
}